const mongoose = require('mongoose');
mongoose.connect('mongodb://127.0.0.1:27017/orderApiDB', { useNewUrlParser: true });

const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', () => {
  // we're connected!
  console.log(' we are connected!')
});

module.exports = mongoose